package com.group.Service.Impl;

import com.group.DAO.BuildingDAO;
import com.group.Enity.Building;
import com.group.Service.BuildingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BuildingServiceImpl implements BuildingService {

    @Autowired
    private BuildingDAO buildingDAO;

    public List<Building> getBuilds(String numbers)
    {
        return buildingDAO.getBuilds(numbers);
    }

    @Override
    public void insertBuild(Building building) {
        buildingDAO.insertBuild(building);
    }

    @Override
    public void edit(int id, String unit, String remarks) {
        buildingDAO.edit(id,unit,remarks);
    }

    @Override
    public void delete(int id) {
        buildingDAO.delete(id);
    }
}
